import { IForm } from '@/components/myForm/types/index';
import { ref } from 'vue';

export const modelConfig = ref<IForm>({
  formItems: [
    {
      label: '用户名',
      placeholder: '请输入用户名',
      key: 'name',
      type: 'input',
      rules: [
        { required: true, message: 'age is required' },
        // { type: 'number', message: 'age must be a number' },
      ],
    },
    {
      label: '真实姓名',
      placeholder: '请输入真实姓名',
      key: 'realname',
      type: 'input',
    },
    {
      label: '密码',
      placeholder: '请输入密码',
      key: 'password',
      type: 'password',
    },
    {
      label: '电话号码',
      placeholder: '电话号码',
      key: 'cellphone',
      type: 'input',
    },
    {
      label: '选择部门',
      placeholder: '请选择部门',
      key: 'departmentId',
      type: 'select',

      options: [
        {
          label: '启用',
          value: 1,
        },
        {
          label: '禁用',
          value: 0,
        },
      ],
      filed: {
        label: 'name',
        value: 'id',
      },
    },
  ],

  colLayout: {
    span: 24,
  },

  itemStyle: {},
});
